package com.xwj.service.impl;

import com.xwj.action.StorageTccAction;
import com.xwj.dao.StorageMapper;
import com.xwj.service.StorageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author xwj
 * @date 2020/11/13
 */
@Service
@Slf4j
public class StorageServiceImpl implements StorageService {
    @Autowired
    private StorageTccAction storageTccAction;

    @Override
    public boolean decrease(Long productId, Integer count) {
        log.info("减库存服务开始执行");
        boolean result = storageTccAction.decreaseTccAction(null, productId, count);
        log.info("减库存服务结束执行");
        return result;
    }
}
